<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="Expires" CONTENT="-1">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
<link rel="stylesheet" href="{:C('VSHOP_CSS')}person.css"/>
</head>
<body>
<header>
  <div class="head"><a href="javascript:history.go(-1);" class="head-return"></a><a href="#" class="head-edit"></a>
    <h2 class="head-title">收货地址</h2>
  </div>
</header>
<main>
  <div class="person-box">
  <form action="{:U('Address/Savedress')}" method="post">
    <ul>
      <li><em>收货人姓名</em>
        <input name="consignee" type="text" class="txt" placeholder="" required>
      </li>
      <li><em>手机/电话</em>
        <input name="phone" type="text" class="txt" placeholder="" required>
      </li>
     <!--  <li><em>邮政编码</em>
       <input name="" type="text" class="txt" placeholder="">
     </li> -->
      <li><em>地址</em> <span class="select-box"><span>
        <select name="shengid" id="shengid" onchange="javascript:area()">
          <option value="0">请选择省</option>
          <foreach name="sheng" item="she" key="key">
          <option value="{$key}">{$she}</option>
          </foreach>
         
        </select>
        </span><span>
        <select name="shiid" id="shiid" onchange="javascript:county()">
          <option value="0">请选择市</option>
        </select>
        </span><span>
        <select name="countyid" id="countyid">
          <option value="0">请选择区域</option>
        </select>
        </span></span>
        </li>

        <li><em>详细地址</em>
        <input name="address" type="text" class="txt" placeholder="" required>
      </li>
     
      <li>
       
        <em>是否默认</em>
        <span class='select-box'>
       <span><input name="isdefault" type="radio"  placeholder=""  value="1">是</span>
       <span><input name="isdefault" type="radio"  placeholder=""  value="0">否</span>
       </span>
      </li>
     
      <div class="blank15"></div>
     <input type="hidden" name="action" value="{$_GET['action']}">
     <input type="submit"  class="btn-red" value="确定">
    </ul>
    </form>
  </div>
</main>
<div class="blank10"></div>
<script src="{:C('VSHOP_JS')}jquery-1.9.1.min.js"></script>
<script type="text/javascript">
////获取区域
  function area()
  {
     var id=$("#shengid").val();
     jQuery.get('{:U("Address/ajaxdress")}',
      {id:id},
      function(data){
        $('#shiid option').remove("option[value !=0]");
        $('#shiid').append(data);
        
      },'text');
   
  }
  function county()
  {
    var id=$("#shiid").val();
     jQuery.get('{:U("Address/ajaxdress")}',
      {id:id},
      function(data){
        $('#countyid option').remove("option[value !=0]");
        $('#countyid').append(data);
        
      },'text');    
  }
</script>
</body>
</html>
